<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"/>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        <div>
            key:<input type="text" v-model="key1">
            value:<input type="text" v-model="value">
            <input type="button" value="保存" @click.prevent="saveToken">
        </div>
        <div>
            key:<input type="text" v-model="key2">
            <input type="button" value="获取key" @click.prevent="getValue">
        </div>
    </div>
</body>
<script>
    let app = new Vue({
        el: "#app",
        data: {
            key1:"",
            value:"",
            key2:""
        },
        methods:{
            saveToken(){
                let params = {
                    key1: this.key1,
                    value: this.value
                }
                $.post("/jwt/saveToken",params,function (data) {
                    alert(data);
                })
            },
            getValue(){
                $.post("/jwt/getValue",{key2:this.key2},function (data) {
                    alert(data);
                })
            }
        }
    })
</script>
</html>